Fix a bug in the state cache mechanism. Refactor this a bit.
authorAlan Mackenzie <acm@muc.de>
Wed, 23 Jan 2013 18:58:11 +0000 (18:58 +0000)
committerAlan Mackenzie <acm@muc.de>
Wed, 23 Jan 2013 18:58:11 +0000 (18:58 +0000)
commitea7e11a928175590f35bd0e8839df6a110590202
tree43f0f5580ebb552a98acf93e7497e8c77f66070b
parentc423803a222cf7c7ead9e743077401ed8ff3c136
Fix a bug in the state cache mechanism.  Refactor this a bit.

cc-engine.el (c-parse-state-get-strategy): Remove the `cache-pos' element
from the return value.
(c-append-lower-brace-pair-to-state-cache): "Narrow" to end of buffer to
enable proper searching from beyond HERE.
Amend the test for detecting the sought brace pair.  Amend the value
written to the "brace desert cache" when the brace isn't found.
(c-remove-stale-state-cache): Rename `good-pos' to `start-point', and
several other variables analogously.
(c-remove-stale-state-cache-backwards): Change `cache-pos' from a
parameter to a locally calculated variable.
(c-parse-state-1): Change the calling conventions to the two defuns
involving `cache-pos'.
lisp/ChangeLog
lisp/progmodes/cc-engine.el